SpatialStream® Code Examples

Neighborhood Boundaries and Labels

Using SpatialStream® Neighborhood Boundaries, SLD, and GetMap components, you can access nationwide neighborhood boundaries and basic attributes for display in your mapping application. This example will demonstrate how to add neighborhood boundaries and neighborhood name labels for the entire US (Southern California shown in sample). The SLD (Stylized Layer Descriptor) component allows you to add labels based on attributes in the neighborhood boundaries data set and tailor the following display parameters of your neighborhood border: boundary color, boundary width, fill color, opacity, label color, and label size. Once the SLD is defined, the GetMap component generates the overlay for your map.

Neighborhood Boundaries | GetMap | SLD

var neighborhood = new Dmp.Layer.WMSLayer("boundary", "SS", {
ignoreHoles: true, antiAlias: true
});
neighborhood.addChild("neighborhoodPoly", "DMP_LICENSE/NEIGHBORHOODSTATS", "$(ACCOUNT_FOLDER)SLD/NeighborhoodBoundary.sld.xml", {
zoomRange: {
min: 10, max: 19
}
});
neighborhood.addChild("neighborhoodLabel", "DMP_LICENSE/NEIGHBORHOODSTATS", "$(ACCOUNT_FOLDER)SLD/NeighborhoodLabel.sld.xml", {
zoomRange: {
min: 12, max: 19
}
});
map.addLayer(neighborhood);


Run Sample   View Video   Back To Index